﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace FlanProjectData.GameObjects
{
    public class Equipement
    {
        public Item leftHand { get; set; }
        public Item rightHand { get; set; }
        public Item head { get; set; }
        public Item legs { get; set; }
        public Item arms { get; set; }
        public Item chest { get; set; }
        public Item foot { get; set; }

        public Equipement()
        {

        }
        public Item changeEquipement(Item newItem)
        {
            Item oldItem = new Item("Item NULL");
            switch (newItem.Type)
            {
                case Item.objectKind.ARMS:
                    oldItem = this.arms;
                    this.arms = newItem;
                    break;
                case Item.objectKind.CHEST:
                    oldItem = this.chest;
                    this.chest = newItem;
                    break;
                case Item.objectKind.FOOT:
                    oldItem = this.foot;
                    this.foot = newItem;
                    break;
                case Item.objectKind.HEAD:
                    oldItem = this.head;
                    this.head = newItem;
                    break;
                case Item.objectKind.HAND:
                    oldItem = this.leftHand;
                    this.leftHand = this.rightHand;
                    this.rightHand = newItem;

                    break;
                case Item.objectKind.LEGS:
                    oldItem = this.legs;
                    this.legs = newItem;
                    break;
            }
            return oldItem;
        }

    }

}
